package com.tange.ai.iot.client.gnssa.httpservice;


import static com.tange.ai.iot.client.gnssa.ConstantKt.*;

import com.tange.ai.iot.client.gnssa.bean.DevicesListBean;
import com.tange.ai.iot.client.gnssa.bean.LoginBean;
import com.tange.ai.iot.client.gnssa.bean.RespMsg;

import java.util.ArrayList;
import java.util.Map;

import io.reactivex.Flowable;
import okhttp3.ResponseBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import retrofit2.http.QueryMap;
import retrofit2.http.Streaming;
import retrofit2.http.Url;

public interface DeviceService {

    @Headers("Content-type:application/json;charset=UTF-8")
    @POST(ACCOUNT_LOGIN)
    Flowable<RespMsg<LoginBean>> postAccountLogin(@Body Map<String, Object> params);

    @Headers("Content-type:application/json;charset=UTF-8")
    @POST(BIND_DEVICE)
    Flowable<RespMsg<Object>> postBindDevice(@Body Map<String, Object> params);

    @Headers("Content-type:application/json;charset=UTF-8")
    @GET(DEVICE_LIST)
    Flowable<RespMsg<DevicesListBean>> getDeviceList(@QueryMap Map<String, Object> params);

    @Headers("Content-type:application/json;charset=UTF-8")
    @POST(UN_BIND_DEVICE)
    Flowable<RespMsg<Object>> postUnBindDevice(@Body Map<String, Object> params);

    @Streaming
    @GET
    Flowable<ResponseBody> downloadFile(@Url String fileUrl);
}
